package com.forcht.server.dao;

import com.forcht.common.domain.ChatOne;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by forcht on 2018/4/15.
 */
public interface ChatOneDao {

    /**
     * 获取未发送给receiver的聊天内容
     * @param sender
     * @param receiver
     * @return
     */
    List<ChatOne> selectChatContent(@Param("sender") String sender,@Param("receiver") String receiver);

    /**
     * 保存未发送出去的聊天消息
     * @param chatOne
     * @return
     */
    int insertChatContent(@Param("chatOne") ChatOne chatOne);

    /**
     * 获取receiver未在线时哪些用户发送信息给他
     * @param receiver
     * @return
     */
    List<ChatOne> selectSenders(@Param("receiver") String receiver);

}

